home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Deutsche Edition 1
/
Deutsche Edition 1.iso
/
amok
/
081-090
/
amok81
/
m2
/
talkdemo
/
txt
/
talkmenu.mod
< prev
next >
Wrap
Text File
|
1993-11-04
|
2KB
|
67 lines
IMPLEMENTATION MODULE TalkMenu;
(*$ LargeVars:=FALSE StackParms:=FALSE Volatile:=FALSE *)
FROM SYSTEM IMPORT ADR;
IMPORT D:TalkBase,
A:Arts,
ID:IntuitionD,
IL:IntuitionL,
GD:GadToolsD,
GL:GadToolsL,
UD:UtilityD,
R:Requester;
PROCEDURE MakeMenu():BOOLEAN;
TYPE
NmArr=ARRAY [1..15] OF GD.NewMenu;
DummyTag=RECORD l:LONGINT END;
CONST
toc=ID.MenuItemFlagSet{ID.checkIt,ID.checked,ID.menuToggle};
N=NmArr{
GD.NewMenu{type:GD.nmTitle,label:ADR("Project")},
GD.NewMenu{type:GD.nmItem, label:ADR("Open Phonemes..."),commKey:ADR("P"),userData:ORD(openPhonID)},
GD.NewMenu{type:GD.nmItem, label:ADR("Open Voice..."),commKey:ADR("V"),userData:ORD(openVoiceID)},
GD.NewMenu{type:GD.nmItem, label:GD.nmBarlabel},
GD.NewMenu{type:GD.nmItem, label:ADR("Save Phonemes..."),userData:ORD(savePhonID)},
GD.NewMenu{type:GD.nmItem, label:ADR("Save Voice..."),userData:ORD(saveVoiceID)},
GD.NewMenu{type:GD.nmItem, label:GD.nmBarlabel},
GD.NewMenu{type:GD.nmItem, label:ADR("Talk"),commKey:ADR("T"),userData:ORD(talkID)},
GD.NewMenu{type:GD.nmItem, label:ADR("About..."),userData:ORD(aboutID)},
GD.NewMenu{type:GD.nmItem, label:ADR("Quit"),commKey:ADR("Q"),userData:ORD(quitID)},
GD.NewMenu{type:GD.nmTitle,label:ADR("Edit")},
GD.NewMenu{type:GD.nmItem, label:ADR("Reset To Default"),commKey:ADR("D"),userData:ORD(resetID)},
GD.NewMenu{type:GD.nmTitle,label:ADR("Options")},
GD.NewMenu{type:GD.nmItem, label:ADR("Save Icons?"),itemFlags:toc,userData:ORD(iconID)},
GD.NewMenu{type:GD.nmEnd}
};
BEGIN
myMenu:=GL.CreateMenusA(ADR(N),ADR(DummyTag{l:UD.tagEnd}));
IF myMenu#NIL THEN
IF GL.LayoutMenusA(myMenu,D.vi,NIL) THEN
IF IL.SetMenuStrip(D.myWindow,myMenu) THEN END;
ELSE
GL.FreeMenus(myMenu);
myMenu:=NIL;
END;
END;
RETURN myMenu#NIL;
END MakeMenu;
BEGIN
IF (D.myWindow=NIL) OR ~MakeMenu() THEN
R.OKRequest("Kann Menü nicht erzeugen!");
END;
CLOSE
IF myMenu#NIL THEN
IL.ClearMenuStrip(D.myWindow);
GL.FreeMenus(myMenu);
myMenu:=NIL
END;
END TalkMenu.mod